package com.onesports.intelligent.k12.polarlight.domain.dto.organization;


import com.onesports.framework.kit.common.valid.Json;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.List;

/**
 * 教练
 *
 * @author wangcx
 * @since 1.0.0 2022-07-12
 */
@Data
@ApiModel(value = "新增教练DTO")
public class InsertCoachDTO {

    @ApiModelProperty(value = "id",hidden = true)
    private String id;

    @NotBlank(message = "请输入姓名")
    @ApiModelProperty(value = "姓名",required = true)
    @Length(max = 20,message = "姓名长度不可以超过20位")
    private String name;

    @NotBlank(message = "请输入身份证号")
    @Length(max = 18,message = "身份证号长度不可以超过18位")
    @ApiModelProperty(value = "身份证号",required = true)
    private String idCard;

    @NotBlank(message = "请输入性别")
    @ApiModelProperty(value = "性别: 1 男   2 女")
    private String gender;

    @NotBlank(message = "请输入手机号")
    @ApiModelProperty(value = "手机号",required = true)
    @Length(max = 11,message = "手机号不可以超过11位")
    private String phone;

    @ApiModelProperty(value = "个人简介")
    private String introduction;

    @NotNull(message = "请输入分账比例")
    @ApiModelProperty(value = "分账比例",required = true)
    @Min(value = 0,message = "分账比例不能小于0,大于100")
    @Max(value = 100,message = "分账比例不能小于0,大于100")
    private BigDecimal subRatio;

    @Valid
    @NotEmpty(message = "请输入校区关联教练")
    @ApiModelProperty(value = "校区关联教练",required = true)
    private List<CoachCampusRelDTO> coachCampusRel;

    @Valid
    @NotEmpty(message = "请输入课程关联教练")
    @ApiModelProperty(value = "课程关联教练",required = true)
    private List<CoachCourseRelDTO> coachCourseRel;

    @Valid
    @NotEmpty(message = "请输入教练关联服务时段")
    @ApiModelProperty(value = "教练关联服务时段",required = true)
    private List<CoachScheduleTemplateRelDTO> coachScheduleTemplateRel;

    @ApiModelProperty(value = "教练头像")
    private String avatar;

    @ApiModelProperty(value = "机构ID",hidden = true)
    private String organizationId;

    @ApiModelProperty(value = "是否启用")
    private Boolean status;

    @ApiModelProperty(value = "微信userId",hidden = true)
    private String wxUserId;

    @NotEmpty(message = "请选择教练类型")
    @ApiModelProperty(value = "教练类型 1：全职教练 2：兼职教练",required = true)
    private String coachType;

    @ApiModelProperty(value = "职工id",hidden = true)
    private String organizationStaffId;

    @ApiModelProperty(value = "角色(角色id集合)")
    private List<String> roleIds;

    @ApiModelProperty(value = "附件集合")
    private List<String> files;
}
